<template>
	<view class="examineAdopt">
		<view class="adopt">
			<image src="/static/image/doctor/examineAdopt.png" mode="scaleToFill" style="width: 164rpx; height: 135rpx;"></image>
			<text class="failed">审核未通过</text>
			<text class="failedtxt">很遗憾，您未通过<text class="healthy">健康诊所</text>的审核</text>
			<view class="determine">
				<text>确认</text>
				<text @click="viewDetails" class="activation">查看详情</text>
			</view>
		</view>

		<view class="scanCodeJoin">
			<text @click="scanCodes">扫码加入</text>
			<text class="iconfont icon-saoyisao saosuotxt"></text>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {};
		},
		methods: {
			async scanCodes() {
				uni.scanCode({
					success: res => {
						this.$store.commit("storeService_id", res.result);
						if (res.result) {
							uni.redirectTo({
								url: "../../clinicDetails3/clinicDetails3"
							})
						}
					}
				});
			},
			async viewDetails() {
				let id = this.$store.state.userinfo.id;
				let res = await this.$myrequest({
					url: `Doctor/reason`,
					method: "POST",
					data: {
						userId: id
					}
				});
				console.log(`1111111111`)
				console.log(res);
				console.log(`222222222222`)
				if (res.data.code == 200) {
					uni.navigateTo({
						url: `../viewDetails3/viewDetails3?reason=${res.data.data.reason}&service_title=${res.data.data.service_title}`
					})
				};
			}
		}
	}
</script>

<style lang="scss">
	page {
		width: 100%;
		height: 100%;
	}

	.scanCodeJoin {
		@include dibuanniu;
		width: 340rpx;
		bottom: 413rpx;
		display: flex;
	}

	.adopt {
		width: 450rpx;
		height: 500rpx;
		padding: 30rpx;
		box-shadow: 0rpx 0rpx 1rpx 1rpx #ECECEC;
		@include shuiping;
		top: 300rpx;
		border-radius: 20rpx;

		image {
			margin: 30rpx auto;
			margin-left: 50%;
			transform: translateX(-50%);
		}
	}

	.determine {
		@include chuizhilianduan;
		margin-top: 45rpx;

		>text {
			display: inline-block;
			width: 182rpx;
			height: 60rpx;
			border: 2rpx solid #41D6B8;
			text-align: center;
			border-radius: 30rpx;
			color: #41D6B8;
		}
	}

	.activation {
		color: #FFFFFF !important;
		background: linear-gradient(90deg, rgba(96, 232, 205, 1), rgba(45, 209, 188, 1)) !important;
	}

	.failed,
	.failedtxt {
		display: inline-block;
		width: 100%;
		text-align: center;
	}

	.failed {
		font-size: 28rpx;
	}

	.failedtxt {
		font-size: 20rpx;
		color: #B3B3B3;

		.healthy {
			color: #2DD1BC !important;
		}
	}
</style>
